<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/4/17
 * Time: 15:21
 */

namespace App\Listeners\Course;


use App\Events\Course\AttendCourse;
use App\Models\Express\ExpressAttend;

class AttendCourseListener
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Handle the event.
     *
     * @param  object  $event
     * @return void
     */
    public function handle(AttendCourse $event)
    {
        $attend = new ExpressAttend();
        $attend->attendClass($event->courserID,$event->userID);
    }
}
